<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>课后反馈报告</title>
    <style>
        body {
            font-family: "Microsoft YaHei", "SimSun", Arial, sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .header {
            text-align: center;
            border-bottom: 3px solid #4a90e2;
            padding-bottom: 20px;
            margin-bottom: 30px;
        }
        
        .header h1 {
            color: #2c3e50;
            margin: 0;
            font-size: 28px;
            font-weight: bold;
        }
        
        .header .subtitle {
            color: #7f8c8d;
            margin-top: 10px;
            font-size: 16px;
        }
        
        .info-section {
            margin-bottom: 25px;
        }
        
        .info-section h2 {
            color: #34495e;
            font-size: 18px;
            margin-bottom: 15px;
            padding-left: 10px;
            border-left: 4px solid #3498db;
        }
        
        .info-grid {
            display: table;
            width: 100%;
            border-collapse: collapse;
        }
        
        .info-row {
            display: table-row;
        }
        
        .info-label {
            display: table-cell;
            width: 120px;
            padding: 8px 12px;
            background-color: #ecf0f1;
            border: 1px solid #bdc3c7;
            font-weight: bold;
            color: #2c3e50;
        }
        
        .info-value {
            display: table-cell;
            padding: 8px 12px;
            border: 1px solid #bdc3c7;
            color: #34495e;
        }
        
        .content-section {
            margin-bottom: 25px;
        }
        
        .content-section h2 {
            color: #34495e;
            font-size: 18px;
            margin-bottom: 15px;
            padding-left: 10px;
            border-left: 4px solid #e74c3c;
        }
        
        .feedback-content {
            background-color: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            border-left: 4px solid #e74c3c;
            font-size: 14px;
            line-height: 1.8;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .photos-section {
            margin-bottom: 25px;
        }
        
        .photos-section h2 {
            color: #34495e;
            font-size: 18px;
            margin-bottom: 15px;
            padding-left: 10px;
            border-left: 4px solid #f39c12;
        }
        
        .photos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        
        .photo-item {
            text-align: center;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 10px;
            background-color: #fafafa;
        }
        
        .photo-item img {
            max-width: 100%;
            max-height: 120px;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .photo-caption {
            margin-top: 8px;
            font-size: 12px;
            color: #7f8c8d;
        }
        
        .footer {
            margin-top: 40px;
            padding-top: 20px;
            border-top: 2px solid #ecf0f1;
            text-align: center;
            color: #7f8c8d;
            font-size: 12px;
        }
        
        .no-photos {
            text-align: center;
            color: #95a5a6;
            font-style: italic;
            padding: 20px;
            background-color: #f8f9fa;
            border-radius: 8px;
        }
        
        .teacher-info {
            background-color: #e8f4fd;
            padding: 15px;
            border-radius: 8px;
            margin-top: 20px;
        }
        
        .teacher-info h3 {
            margin: 0 0 10px 0;
            color: #2980b9;
            font-size: 16px;
        }
        
        .teacher-info p {
            margin: 5px 0;
            color: #34495e;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部 -->
        <div class="header">
            <h1>课后反馈报告</h1>
            <div class="subtitle">Class Feedback Report</div>
        </div>
        
        <!-- 基本信息 -->
        <div class="info-section">
            <h2>基本信息</h2>
            <div class="info-grid">
                <div class="info-row">
                    <div class="info-label">课程名称</div>
                    <div class="info-value">
                        <span th:text="${feedback.courseName}"></span>
                        <span th:if="${feedback.courseName == null or #strings.isEmpty(feedback.courseName)}" th:text="${feedback.courseText ?: '未设置'}">未设置</span>
                    </div>
                </div>
                <div class="info-row">
                    <div class="info-label">上课时间</div>
                    <div class="info-value">
                        <span th:text="${feedback.teachDate ?: '未设置'}"></span>
                        <span th:if="${feedback.startTime != null}"> [[${feedback.startTime}]] - [[${feedback.endTime}]]</span>
                    </div>
                </div>
                <div class="info-row">
                    <div class="info-label">提交时间</div>
                    <div class="info-value" th:text="${#temporals.format(feedback.createTime, 'yyyy年MM月dd日 HH:mm')}">提交时间</div>
                </div>
                <div class="info-row">
                    <div class="info-label">反馈ID</div>
                    <div class="info-value" th:text="${feedback.id}">反馈ID</div>
                </div>
                <div class="info-row">
                    <div class="info-label">学生</div>
                    <div class="info-value" th:text="${feedback.studentName ?: '未设置'}">学生</div>
                </div>
            </div>
        </div>
        
        <!-- 反馈内容 -->
        <div class="content-section">
            <h2>反馈内容</h2>
            <div class="feedback-content" th:text="${feedback.content ?: '（无内容）'}">反馈内容</div>
        </div>
        
        <!-- 反馈图片 -->
        <div class="photos-section">
            <h2>反馈图片</h2>
            <div th:if="${photos != null and !photos.isEmpty()}" class="photos-grid">
                <div th:each="photo, iterStat : ${photos}" class="photo-item">
                    <img th:src="${photo}" th:alt="'反馈图片 ' + ${iterStat.index + 1}" />
                    <div class="photo-caption">图片 [[${iterStat.index + 1}]]</div>
                </div>
            </div>
            <div th:if="${photos == null or photos.isEmpty()}" class="no-photos">暂无反馈图片</div>
        </div>
        
        <!-- 教师信息 -->
        <div class="teacher-info">
            <h3>教师信息</h3>
            <p><strong>教师姓名：</strong><span th:text="${feedback.teacherName ?: '未设置'}">教师姓名</span></p>
            <p><strong>生成时间：</strong><span th:text="${currentTime}">生成时间</span></p>
        </div>
        
        <!-- 页脚 -->
        <div class="footer">
            <p>青云教育系统 - 课后反馈报告</p>
            <p>本报告由系统自动生成，如有疑问请联系相关教师</p>
        </div>
    </div>
</body>
</html>
